package com.drcoffee.drcoffeemall.service;

import com.drcoffee.drcoffeemall.entry.*;
import com.drcoffee.drcoffeemall.entry.search.OrderSearch;
import jakarta.servlet.http.HttpServletResponse;
import net.sf.jasperreports.engine.JRException;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Map;

public interface OrderService {
    /* 查询订单 */
    Result getAllOrder(OrderSearch orderSearch);

    /* 提交订单 */
    Result submitOrder(String Token, Map<String, Object> orderMap);

    /* 发送订单邮件 */
    Map<String, Object> sendOrderEmail(HttpServletResponse response, String Token, String order_code);

    File derivePdf(HttpServletResponse response, String order_code, String language, Integer type) throws IOException, JRException;

    Result getTransport(String order_code);


    Result getOrderByCode(String Token, String code, String language);//根据code查询订单

    Result getNoPayOrderByCode(String code);

    Result setOrderBackStatus(String code);


    Result getOrderHeader(String code);

    Result addPayVoucher(PayVoucher payVoucher);


    Result sendRemit(String phone, String code);

    Result getPayVoucher(String code);


    Result getOrderPartsTotal(Map<String, Object> par);

    Result getPayType(String code);


    Result cancelOrder(String code);

    Result allPayVerify(String orderCode, Integer type);

    Result setOrderStatus(String orderCode, Integer status);



}
